//
//  IDentityCodeController.m
//  NtoccDriverNew
//
//  Created by 张天兴 on 2025/7/4.
//  Copyright © 2025 GCY. All rights reserved.
//

#import "IDentityCodeController.h"
#import "StartFaseController.h"

@interface IDentityCodeController ()

@end

@implementation IDentityCodeController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setTitle:@"身份证信息识别"];
    self.topHeight.constant = 15;
    self.commitButton.layer.masksToBounds = YES;
    self.commitButton.layer.cornerRadius = 10;
    self.nameTextField.text = self.name;
    self.IDCodeTextField.text = self.IDCod;
    self.timeGuoqiTextView.text = self.idCardDueDate;
    self.view.backgroundColor = BackgroundColor;
    if ([self.isOldType isEqualToString:@"1"]) {
        self.nameTextField.userInteractionEnabled = NO;
        self.IDCodeTextField.userInteractionEnabled = NO;
    }else{
        self.nameTextField.userInteractionEnabled = YES;
        self.IDCodeTextField.userInteractionEnabled = YES;
    }

}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/
- (IBAction)comittButtonAction:(UIButton *)sender {
    [self individuaiFaceNetworking];
   
}
- (void)individuaiFaceNetworking{
    if (self.nameTextField.text.length <= 0) {
        [XSInfoView showInfo:@"请输入姓名" onView:self.view];
        return;
    }
    if (self.IDCodeTextField.text.length <= 0) {
        [XSInfoView showInfo:@"请输入身份证号" onView:self.view];
        return;
    }
    StartFaseController *vc = [[StartFaseController alloc] init];
    vc.name = self.nameTextField.text;
    vc.idnoBackImg = self.idnoBackImg;
    vc.idnoFrontImg = self.idnoFrontImg;
    vc.isOldType = self.isOldType;
    vc.IDcodeTime = self.idCardDueDate;
    vc.IDCod = self.IDCodeTextField.text;
    [self.navigationController pushViewController:vc animated:YES];
}
@end
